<!DOCTYPE html>
<!--
*
* Copyright (C) 2015, bitmovin GmbH, All Rights Reserved
*
* Created on: 2015-06-12 14:00:00
* Author:     bitmovin GmbH <dash-player@bitmovin.net>
*
* This source code and its use and distribution, is subject to the terms
* and conditions of the applicable license agreement.
*
-->
<html lang="en">
<head>
  <title>libdash SDK</title>
  <meta charset="UTF-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" type="text/css" href="../style/demo.css"/>
  <link rel="stylesheet" type="text/css" href="../style/style.css"/>
  <link href='http://fonts.googleapis.com/css?family=Dosis' rel='stylesheet' type='text/css'/>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>

  <script type="text/javascript" src="libdash/settings.js"></script>

  <!-- player -->
  <script type="text/javascript" src="https://bitmovin-a.akamaihd.net/bitdash/latest/bitdash.min.js"></script>

</head>
<body>
<a href="index.html"><button id="back-button">Back to the Menu</button></a>
<div class="container">
  <h1>Subtitles & Closed Captions <span>Displaying text for additional or interpretive information</span></h1>

  <div class="content">
    <div class="player-wrapper">
      <div id="player"></div>
    </div>
    <div class="description">
      <h2 class="ca-main">Subtitles or Closed Captions specified in the Manifest</h2>
      <p>The player supports multiple audio/language tracks, without the need of duplication or repackaging the video.
        Publishers can easily provide multiple language tracks for video assets, where our players support multi-bitrate
        audio tracks also in multi-language scenarios. It further includes functionalities that allows viewers to
        instantaneously switch to an alternate audio track either before or during playback.</p>
      <p>Text Tracks can be specified within the MPD or M3u8, as it can be seen in our
        <a href="http://bitdash-a.akamaihd.net/content/sintel/sintel.mpd" target="_blank">DASH (mpd)</a> and
        <a href="http://bitdash-a.akamaihd.net/content/sintel/hls/sintel.m3u8" target="_blank">HLS (m3u8) test streams</a>.</p>
    </div>
  </div>

</div>
<script type="text/javascript" src="js/ErrorMsgHelper.js"></script>
<script type="text/javascript">
  (function() {
    var createPlayer = function () {
      var conf = {
        key: window.libdashSettings.credentials.key,
        source: {
          dash: 'http://bitdash-a.akamaihd.net/content/sintel/sintel.mpd',
          hls: 'http://bitdash-a.akamaihd.net/content/sintel/hls/sintel.m3u8',
          progressive: [
            'http://bitdash-a.akamaihd.net/content/sintel/Sintel.mp4',
            'http://bitdash-a.akamaihd.net/content/sintel/Sintel.webm'
          ],
          poster: 'http://bitdash-a.akamaihd.net/content/sintel/poster.png'
        },
        style: {
          width: '50vw',
          aspectratio: '16/9'
        },
        events: {
          onError: function (data) {
            console.error("error: " + data.code + ": " + data.message);
          },
          onReady: function (data) {
            console.log(this.getVersion() + ' onReady: ', data);
          }
        }
      };

      var player = bitdash('player');
      player.setup(conf);

    };
    createPlayer();
  }());
</script>
</body>
</html>
